import request from "@/utils/request";

export function z(data) {
    return request({
        url: 'backend/cate/save',
        method: 'POST',
        data: {
            pid: data.pid,
            type: data.type,
            name: data.name,
            sort: data.sort
        }
    })
}

export function s(id) {
    return request({
        url: `backend/cate/delete?id=${id}`,
        method: 'DELETE',
        data: {
            id: id
        }
    })
}

export function g(data) {
    return request({
        url: 'backend/cate/update',
        method: 'POST',
        data: {
            id: data.id,
            pid: data.pid,
            type: data.type,
            name: data.name,
            sort: data.sort
        }
    })
}

export function c() {
    return request({
        url: 'backend/cate/index',
        method: 'GET'
    })
}
